package com.laowang.project.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 收件地址对象 tb_receive_address
 *
 * @author laowang
 * @date 2022-12-21
 */
@NoArgsConstructor
@Data
public class TbReceiveAddress implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @ApiModelProperty(value = "${comment}", required = false)
    private Long id;

    /**
     * 关联用户id
     */
    @Excel(name = "关联用户id")
    @ApiModelProperty(value = "关联用户id", required = false)
    private Integer userId;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    @ApiModelProperty(value = "联系人", required = false)
    @NotBlank(message = "联系人不能为空")
    private String contactPerson;

    /**
     * 手机
     */
    @Excel(name = "手机")
    @NotBlank(message = "手机号不能为空")
    @ApiModelProperty(value = "手机", required = false)
    private String phone;

    /**
     * 地址
     */
    @Excel(name = "地址")
    @ApiModelProperty(value = "地址", required = false)
    @NotBlank(message = "收件地址不能为空")
    private String address;

    /**
     * 1默认启用,0关闭
     */
    @Excel(name = "1默认启用,0关闭")
    @ApiModelProperty(value = "1默认启用,0关闭", required = false)
    private Integer isEnable;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createTime;


}
